package com.kehutong.contact.enums;

import org.coraframework.util.HashID;

/**
 * 客户类型
 *
 * @Author: liu jin Hwang
 */
public enum CustomerType implements HashID {

    ENTERPRISE("1", "企业客户"),
    INDIVIDUAL("2", "个人客户");

    private final String id;
    private final String desc;

    private CustomerType(String id, String desc) {
    	this.id = id;
        this.desc = desc;
    }

    public static CustomerType get(String desc) {
        CustomerType[] customerTypes = values();
        for (CustomerType customerType : customerTypes) {
            if (customerType.getDesc().equals(desc)) {
                return customerType;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }
    

	@Override
    public String getDesc() {
        return desc;
    }
    
}
